#ifndef PYHP_DB
#define PYHP_DB

/**
 * @file db.h
 * pyhp database abstraction support
 */

#include "Python.h"
#include "mod_pyhp.h"

void pyhp_db_export(PyObject *dict, PyObject *self);

PyObject *pyhp_cdb_connect(PyHPData *pydata, char const * url, char const *user, char const *pass);
int pyhp_cdb_exec(PyHPData *pydata, PyObject *connection, char const *query);
PyObject *pyhp_cdb_query(PyHPData *pydata, PyObject *connection, char const *query);

int pyhp_cdb_result_rcount(PyObject *qresult);
PyObject *pyhp_cdb_result_fetchall(PyObject *qresult);

#endif

